package com.tange.ai.core.demo.add;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.tange.ai.core.demo.Utils;
import com.tange.ai.core.demo.add.ap.DeviceApScanActivity;
import com.tange.ai.core.demo.add.lan.DeviceLanScanActivity;
import com.tange.ai.core.demo.add.scan.ScanWiFiConfigurationActivity;
import com.tange.ai.core.demo.databinding.ActivityAddTypeChooseBinding;

public class AddTypeChooseActivity extends AppCompatActivity {

    private ActivityAddTypeChooseBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = ActivityAddTypeChooseBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        getSupportActionBar().hide();

        Utils.setStatusBar(this, Color.TRANSPARENT);

        binding.addByApScan.setOnClickListener(view -> startActivity(new Intent(AddTypeChooseActivity.this, DeviceApScanActivity.class)));

        binding.addByDeviceScanQrCode.setOnClickListener(view -> startActivity(new Intent(AddTypeChooseActivity.this, ScanWiFiConfigurationActivity.class)));

        binding.addByLan.setOnClickListener(view -> startActivity(new Intent(AddTypeChooseActivity.this, DeviceLanScanActivity.class)));

        binding.addByDirectlyBind.setOnClickListener(view -> {
            Toast.makeText(this, "开发中", Toast.LENGTH_SHORT).show();
        });
    }


}